package com.patrol.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.patrol.pojo.*;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface WorkerService {
    /**
     * 增删改
     *
     * @return ：成功或失败信息
     */
    boolean insert(Worker worker);

    boolean delete(int workerId);

    boolean update(Worker worker);

    /**
     * 通过workId查询全部信息
     *
     * @return ：Msg 里add(信息，Worker类)
     */
    Worker select(int id);

    Page<Worker> selectPage(long currentPage, long limit);

    void exportDataByDate(HttpServletResponse response, String startTime, String endTime) throws IOException;

    void exportAllRiskPoints(HttpServletResponse response) throws IOException;

//    boolean signWork(String userId, String date);

    List<Worker> selectAllWorkers();

    void exportAllTaskPoints(HttpServletResponse response) throws IOException;

    void exportAllLCTaskPoints(HttpServletResponse response) throws IOException;

    void userClock(Integer userId, String time);

    Integer findUserClock(Integer userId, String time);

    List<String> findHistoryUserClock(Integer userId);

    void createUserTask(Integer userId);

    void updateUserTaskNum(Integer userId);

    void updateDQTaskSign(String userId);

    List<SendInfo> selectInfo(Integer userId);

    List<Integer> selectNowXGUser();

    void updateXGLXSign(Integer userId);

    String selectRWOverTime(String userId);

    List<Xglx> selectAllInRW(String userId);

    List<Xgexport> XGUserNumExport(String startTime, String endTime);

    void addXGTJ(int xgzs,int dgzs,String time);

    void updateXGTJ(int id,int xgzs);

    Integer selectXGExport(String time);

    List<Xgexport> XGUserNumExportQC();

    List<Rwexport> RWNumExportQC();

    int selectRWNum();

    int selectRWLCNum();

    void addRWTJ(int rwNum, int rwlcNum, String time, int hfxnum, int zfxnum, int dfxnum);

    Integer selectRWReport(String time);

    void updateRWTJ(Integer id, int rwlcNum, int hfxnum, int zfxnum, int dfxnum);

    List<Rwexport> RWNumExport(String startTime, String endTime);

    int selectHfxNum();

    int selectZfxNum();

    int selectDfxNum();

    void addUserKQTJ(int userId, String realName, String time, String detailTime);

    int selectRWLCNumById(Integer userId);

    void updateUserKQTJ(int userId, int num);

    List<Userkq> userKQExportQC();

    List<Userkq> userKQExport(String startTime, String endTime);

    //查询当前时间巡更人员的到岗人数
    int selectXGDGNum(String time);

    Integer selectUserToday(Integer userId, String dkTime);
}
